using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class FileCheckStep_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(global::FileCheckStep);
            args = new Type[]{};
            method = type.GetMethod("get_Tips", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Tips_0);
            args = new Type[]{};
            method = type.GetMethod("get_Progress", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Progress_1);
            args = new Type[]{};
            method = type.GetMethod("Reset", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Reset_2);
            args = new Type[]{};
            method = type.GetMethod("FileCheckTask", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, FileCheckTask_3);
            args = new Type[]{};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_4);
            args = new Type[]{};
            method = type.GetMethod("Download", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Download_5);

            field = type.GetField("maxCount", flag);
            app.RegisterCLRFieldGetter(field, get_maxCount_0);
            app.RegisterCLRFieldSetter(field, set_maxCount_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_maxCount_0, AssignFromStack_maxCount_0);
            field = type.GetField("maxLength", flag);
            app.RegisterCLRFieldGetter(field, get_maxLength_1);
            app.RegisterCLRFieldSetter(field, set_maxLength_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_maxLength_1, AssignFromStack_maxLength_1);
            field = type.GetField("NeedAgree", flag);
            app.RegisterCLRFieldGetter(field, get_NeedAgree_2);
            app.RegisterCLRFieldSetter(field, set_NeedAgree_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_NeedAgree_2, AssignFromStack_NeedAgree_2);


            app.RegisterCLRCreateDefaultInstance(type, () => new global::FileCheckStep());
            app.RegisterCLRCreateArrayInstance(type, s => new global::FileCheckStep[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* get_Tips_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Tips;

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* get_Progress_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Progress;

            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static StackObject* Reset_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Reset();

            return __ret;
        }

        static StackObject* FileCheckTask_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.FileCheckTask();

            return __ret;
        }

        static StackObject* Update_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update();

            return __ret;
        }

        static StackObject* Download_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::FileCheckStep instance_of_this_method = (global::FileCheckStep)typeof(global::FileCheckStep).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Download();

            return __ret;
        }


        static object get_maxCount_0(ref object o)
        {
            return ((global::FileCheckStep)o).maxCount;
        }

        static StackObject* CopyToStack_maxCount_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::FileCheckStep)o).maxCount;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_maxCount_0(ref object o, object v)
        {
            ((global::FileCheckStep)o).maxCount = (System.Int32)v;
        }

        static StackObject* AssignFromStack_maxCount_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @maxCount = ptr_of_this_method->Value;
            ((global::FileCheckStep)o).maxCount = @maxCount;
            return ptr_of_this_method;
        }

        static object get_maxLength_1(ref object o)
        {
            return ((global::FileCheckStep)o).maxLength;
        }

        static StackObject* CopyToStack_maxLength_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::FileCheckStep)o).maxLength;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_maxLength_1(ref object o, object v)
        {
            ((global::FileCheckStep)o).maxLength = (System.Int32)v;
        }

        static StackObject* AssignFromStack_maxLength_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @maxLength = ptr_of_this_method->Value;
            ((global::FileCheckStep)o).maxLength = @maxLength;
            return ptr_of_this_method;
        }

        static object get_NeedAgree_2(ref object o)
        {
            return ((global::FileCheckStep)o).NeedAgree;
        }

        static StackObject* CopyToStack_NeedAgree_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::FileCheckStep)o).NeedAgree;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_NeedAgree_2(ref object o, object v)
        {
            ((global::FileCheckStep)o).NeedAgree = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_NeedAgree_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @NeedAgree = ptr_of_this_method->Value == 1;
            ((global::FileCheckStep)o).NeedAgree = @NeedAgree;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new global::FileCheckStep();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
